﻿@model GameSchool.Models.Lecture
           <link href="@Url.Content("~/Content/css/lectures.css")" rel="stylesheet" type="text/css" />


<section class="newsItem full">
            <h2>@Html.DisplayFor(model => model.Title)</h2>
            <hr />
            <section class="lectureVideo">
                <iframe width="560" height="315" src="@Html.DisplayFor(model => model.VideoLink)" frameborder="0" allowfullscreen="true"></iframe>
           </section>
           <hr />
           <section class="lectureDescription">
            <h2>Lýsing:</h2>
            <p>@Html.DisplayFor(model => model.Descr)</p>
            </section>

          <hr />
            <h3>Athugasemdir:</h3>
            <section id="comments">
            </section>

            <form action="PostComment()" method="post">

            @Html.HiddenFor(model => model.ID)

            <legend>Skrifa athugasemd:</legend>
            <fieldset>
                
                <textarea style="resize: none;" id="commentText"></textarea>
                   
                 <a class="sendCommentButton" href="javascript:AddComment()">Bæta við athugasemd</a>
             
                
            </fieldset>
                
            </form>
            

           
</section>
<style type="text/css">


</style>

<script id="commentTemplate" type="text/html">
                <section id="${ID}" class="comment">
                    <h4>${User} - ${CommentDate}</h4>
                    <h5> Fjöldi þeirra sem líkar þetta: <div id="number-${ID}">${Likes}</div> - <text id="alreadyLiked-${ID}"></text> </h5>           	  
                    <p>${CommentText}</p>  
                              
                     <span>
                     <a href="javascript:LikeComment(${ID})" id="like-link-${ID}"><img src="@Url.Content("~/Content/img/design/likethumb.png")" id="likethumb" />Læka þetta!</a>
                     </span>           

                    </section>
                   
					
                </section>
            </script>

@section FooterScript{
<script type="text/javascript">
                $(document).ready(function () {
                    GetComments(@Model.ID);
                    GetCoursePoints(@Model.CourseID);
                });

</script>
}